 package org.code.util;
 
 import java.io.IOException;
 import java.io.InputStream;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.Map;
 import java.util.Properties;
 
 public class Prop
 {
   public Map<String, String> getProp(String propPath)
   {
     Map<String, String> propMap = new HashMap<String, String>();
 
     if (propPath.indexOf("/") != 0) {
       propPath = "/" + propPath;
     }
 
     InputStream in = getClass().getResourceAsStream(propPath);
 
     Properties prop = new Properties();
     try
     {
       prop.load(in);
 
       Iterator it = prop.entrySet().iterator();
       while (it.hasNext()) {
         Map.Entry entry = (Map.Entry)it.next();
         String key = entry.getKey().toString();
         String value = entry.getValue().toString();
         propMap.put(key, value);
       }
 
     }
     catch (IOException e)
     {
       e.printStackTrace();
     }
 
     return propMap;
   }
 }

